import { CaptchaAPIRes, LoginAPIReq, LoginAPIRes } from "@/types/api";
import { StaticList } from '@/types/common';
import { get, post, put, del } from "../utils/request"
// 验证码请求
export const CaptchaAPI = (): Promise<CaptchaAPIRes> => get("/prod-api/captchaImage");
// 登录请求
export const LoginAPI = (params: LoginAPIReq): Promise<any> => post(`/pay/user/loginSpecial?account=${params.account}&password=${params.password}`, params);
// 获取用户信息
export const loadUserMsg = (token: string): Promise<any> => post(`/pay/user/getUserMsgByToken?accessToken=${token}`, null);
// 获取登录用户角色
export const loadLoginUserRole = (): Promise<any> => post(`/cdwl-weal-grant-service/sysUser/currentLoginUserRole`, null);

// 上传文件
export const uploadFile =(params: any)=>{
  return post("/cdwl-pay-base-service/file/upload",params)
}